<%@page contentType="text/html;charset=UTF-8"%>
<%@include file="/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<jsp:include page="/platform/include/page_edit_head.jsp">
	<jsp:param name="title" value="编辑" />
</jsp:include>
<link href="${platform}/css/tab-fix.css" rel="stylesheet">
</head>
<body style="width: 750px; overflow-x: hidden;" path="${path}">
	<!--主区域 -->
	<div class="main-container" id="mainContainer">
		<form class="form-horizontal" role="_editForm form" action="ajax_edit"
			data-validate="true" id="editForm" method="post">
			<c:if test="${item.id > 0 }">
				<input id="" name="id" type="hidden" value="${item.id }" />
			</c:if>
			<div class="main-contentWrap cm-f14">
				<div class="tab-wrap cm-mb15">
					<ul id="myTab" class="nav nav-tabs">
						<li><a href="javascript:void(0);" role="_tab"
							data-target="#baseInfo">基本信息</a></li>
						<li><a href="javascript:void(0);" role="_tab"
							data-target="#detailInfo">详细信息</a></li>
					</ul>
				</div>
				<div class="tab-content clearfix">
					<!-- tab内容 -->
					<%-- 基本信息 --%>
					<div class="cm-tab-panel" id="baseInfo">
						<table class="table cm-mg0">
							<tr>
								<td class="col-xs-2 table-item"><label class="cm-required">*</label>业务ID:</td>
								<td class="col-xs-8"><input type="text"
									class="table-input cm-w240 {required:true}" name="code"
									id="code" value="${item.code}" /></td>
							</tr>
							<tr>
								<td class="col-xs-2 table-item"><label class="cm-required">*</label>账号:
								</td>
								<td class="col-xs-8">
									<c:choose>
										<c:when test="${item.id > 0 }">
	                						${item.account}
	                					</c:when>
										<c:otherwise>
											<input type="text"
												class="table-input cm-w240 {required:true}" name="account"
												id="account" value="${item.account}" />
											<label class="cm-lh31 cm-f14 cm-f-normal">2-30个字符</label>
										</c:otherwise>
									</c:choose></td>
							</tr>
							<c:if test="${null == item }">
								<tr>
									<td class="col-xs-2 table-item"><label class="cm-required">*</label>密码:
									</td>
									<td class="col-xs-8"><input type="password"
										class="table-input cm-w240 {required:true,password:'#account'}"
										name="password" id="password" value="" /> <!-- <label class="cm-lh31 cm-f14 cm-f-normal">2-30个字符</label> -->
									</td>
								</tr>
							</c:if>
							<tr>
								<td class="col-xs-2 table-item"><label class="cm-required">*</label>姓名:
								</td>
								<td class="col-xs-8"><input type="text"
									class="table-input cm-w240 {required:true}" name="cname" id=""
									value="${item.cname }" /></td>
							</tr>
							<tr>
								<td class="col-xs-2 table-item"><label class="cm-required">*</label>性别:
								</td>
								<td class="col-xs-8"><select name="sex"
									class="table-select cm-w240 {required:true}"
									role="_defaultData"
									data-defaultValue="${(null==item.sex)?'':item.sex}">
										<option value="0">请选择性别</option>
										<c:if test="${commArray.arr_Gender!= null}">
											<c:forEach var="arrItem" items="${commArray.arr_Gender }"
												varStatus="i" begin="1">
												<option value="${i.index }">${arrItem }</option>
											</c:forEach>
										</c:if>
								</select></td>
							</tr>
							<tr>
				                <td class="col-xs-2 table-item">
				                	<label class="cm-required">*</label>角色:
				                </td>
				                <td class="col-xs-8">
				                	<select name="roleids" role="_chosen" data-placeholder="选择角色..." class="{required:true} cm-w240" tabindex="-1" multiple data-defaultValue="${roleids}">
										<c:forEach var="r" items="${roles}">
											<option value="${r.id}">${r.cname}</option>
										</c:forEach>
									</select>
				                </td>
							</tr>
							<tr>
								<td class="col-xs-2 table-item"><label class="cm-required">*</label>手机:
								</td>
								<td class="col-xs-8"><input type="text"
									class="table-input cm-w240 {required:true,mobile:true}"
									name="phone" id="" value="${item.phone }" /></td>
							</tr>
							<tr>
				                <td class="col-xs-2 table-item">
			                      年龄:
			                    </td>
				                <td class="col-xs-8">
				                  <input type="text" class="table-input cm-w240 {defaultInt:true}" name="age" id="" value="${item.age }"/>
				                </td>
				              </tr>
							<tr>
								<td class="col-xs-2 table-item"><label class="cm-required">*</label>服务语种:
								</td>
								<td class="col-xs-8"><select name="lang" role="_chosen"
									data-placeholder="选择语种..." class="{required:true} cm-w240"
									tabindex="-1" multiple data-defaultValue="${item.lang}">
										<c:if test="${commArray.arr_Lang!= null}">
											<c:forEach var="arrItem" items="${commArray.arr_Lang }"
												varStatus="i" begin="1">
												<option value="${i.index }">${arrItem }</option>
											</c:forEach>
										</c:if>
								</select></td>
							</tr>
							<tr>
								<td class="col-xs-2 table-item"><label class="cm-required">*</label>
									身份证:</td>
								<td class="col-xs-8"><input type="text"
									class="table-input cm-w240 {required:true,idCard:true}"
									name="idcard" id="" value="${item.idcard}" /></td>
							</tr>
							<tr>
								<td class="col-xs-2 table-item"><label class="cm-required">*</label>状态:
								</td>
								<td class="col-xs-8"><select name="status"
									class="table-select cm-w240 {required:true}"
									role="_defaultData"
									data-defaultValue="${(null==item.status)?'':item.status}">
										<option value="">请选择状态</option>
										<c:if test="${commArray.arr_Isforbid!= null}">
											<c:forEach var="arrItem" items="${commArray.arr_Isforbid }"
												varStatus="i" begin="1">
												<option value="${i.index }">${arrItem }</option>
											</c:forEach>
										</c:if>
								</select></td>
							</tr>
						</table>
					</div>
					<!--详细信息-->
					<div class="cm-tab-panel" id="detailInfo">
						<table class="table cm-mg0">
							<tr>
								<td class="col-xs-2 table-item">头像:</td>
								<td class="col-xs-8">
									<div class="upload-viewer">
										<span class="imgDelete icon-remove-sign" title="清空图片"
											data-baseurl="${platform}"
											data-defaultPhoto="/images/default-photo.jpg"></span> <a
											href="javascript:void(0);"></a> <img
											src="${platform}/images/default-photo.jpg" border="0"
											width="100%">
									</div> <input type="hidden" name="photo"
									<c:if test="${item.id > 0  && fn:length(item.photo) > 0}"> data-baseurl="${CONTEXT_UPLOADPATH}"  role="_showPicurl" </c:if>
									id="picurl" value="${item.photo}" class="" /> <input
									class="fileupload" id="fileupload1" type="file" name="files[]"
									role="_upload" data-show="true" data-target="picurl"
									accept="image/gif,image/jpeg,image/png">
								</td>
							</tr>
							<tr>
								<td class="col-xs-2 table-item">简介:</td>
								<td class="col-xs-8"><textarea class="table-input cm-w240"
										name="intro">${item.intro }</textarea></td>
							</tr>
							<tr>
								<td class="col-xs-2 table-item">上次登录:</td>
								<td class="col-xs-8">${item.lastlogin }</td>
							</tr>
							<tr>
								<td class="col-xs-2 table-item">上次登录ip:</td>
								<td class="col-xs-8">${item.lastip }</td>
							</tr>
							<c:if test="${item.id > 0 }">
								<tr>
									<td class="col-xs-2 table-item">创建时间:</td>
									<td class="col-xs-8"><label
										class="cm-lh31 cm-f14 cm-f-normal cm-mg0">${item.createdate }</label>
									</td>
								</tr>
								<tr>
									<td class="col-xs-2 table-item">修改时间:</td>
									<td class="col-xs-8"><label
										class="cm-lh31 cm-f14 cm-f-normal cm-mg0">${item.lastdate }</label>
									</td>
								</tr>
							</c:if>
						</table>
					</div>
				</div>
				<table class="table cm-mg0">
					<tr>
						<td class="cm-tac" colspan="2"><input type="submit"
							class="cm-btn-default cm-border0" value="确定">
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
							href="javascript:window.Util.showBox.closeBox();"
							class="cm-btn-default">取消</a></td>
					</tr>
					</tbody>
				</table>
			</div>
		</form>
	</div>
	<footer></footer>
	<jsp:include page="/platform/include/page_edit_footer.jsp"></jsp:include>
	<script type="text/javascript" src="${platform}/js/views/cm_tab.js"></script>
</body>
</html>

